import request from '@/utils/request'

// 获取学科列表
export const getSubjectList = () => {
  return request({
    url: '/subject/list'
  })
}

// 获取企业列表
export const getEnterpriseList = () => {
  return request({
    url: '/enterprise/list'
  })
}

// 获取题库列表
export const getQuestionList = (params: object) => {
  return request({
    url: '/question/list',
    params
  })
}

// 更改状态
export const changeQuestionStatus = (data: object) => {
  return request({
    url: '/question/status',
    method: 'POST',
    data
  })
}

// 删除题目
export const deleteQuestion = (data: object) => {
  return request({
    url: '/question/remove',
    method: 'POST',
    data
  })
}

// 新增题目
export const addQuestion = (data: object) => {
  return request({
    url: '/question/add',
    method: 'POST',
    data
  })
}

// 修改题目
export const updateQuestion = (data: object) => {
  return request({
    url: '/question/edit',
    method: 'POST',
    data
  })
}
